package edu.sctu.zhengsenwen.month201506.day20150614.lock;

/**
 * Created by user15 on 2015/6/15.
 */
public class SynchronizingClass {

    private int contents;


    public synchronized void put(int value) {

        contents = value;

        System.out.println("输入的数据=" + value);
    }

    public synchronized int get() {

        System.out.println("取得的数据=" + contents);

        return contents;
    }
}
